bitkeeper revision 1.1167 (420b96b4EStXs5M4SVJpHN9DT5wwkQ)
authorsos22@douglas.cl.cam.ac.uk <sos22@douglas.cl.cam.ac.uk>
Thu, 10 Feb 2005 17:15:32 +0000 (17:15 +0000)
committersos22@douglas.cl.cam.ac.uk <sos22@douglas.cl.cam.ac.uk>
Thu, 10 Feb 2005 17:15:32 +0000 (17:15 +0000)
smp_send_stop sometimes reenabled interrupts.  Make sure it doesn't.

xen/arch/x86/cdb.c

index b0e8462ac6ea39cf8c9fba653c6aa99ddf80a2dc..4ba5b307bfd89ebef74d30a8fc99474a2b61b337 100644 (file)
@@ -327,10 +327,6 @@ __trap_to_cdb(struct xen_regs *regs)
                return;
        }
 
-       /* Try to make things a little more stable by disabling
-          interrupts while we're here. */
-       local_irq_save(flags);
-
        /* We rely on our caller to ensure we're only on one processor
         * at a time... We should probably panic here, but given that
         * we're a debugger we should probably be a little tolerant of
@@ -346,11 +342,15 @@ __trap_to_cdb(struct xen_regs *regs)
        if (!atomic_dec_and_test(&xendbg_running)) {
                printk("WARNING WARNING WARNING: Avoiding recursive xendbg.\n");
                atomic_inc(&xendbg_running);
-               local_irq_restore(flags);
                return;
        }
 
        smp_send_stop();
+
+       /* Try to make things a little more stable by disabling
+          interrupts while we're here. */
+       local_irq_save(flags);
+
        old_watchdog = watchdog_on;
        watchdog_on = 0;